package com.brillilab.domain.enums.method;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author wuzhiyu
 * @Title: MethodSourceEnum
 * @ProjectName brill_lab
 * @Description: TODO
 * @date 2019/2/229:21
 */
@Getter
@AllArgsConstructor
public enum MethodSourceEnum {
CREATE(2,"新建"),IMPORT(0,"新建"),RECOMMEND(1,"推荐"),SHARE(3,"成员分享"),REST_CURRENT(4,"设为新版本");
    private Integer sourceType;
    private String name;
    
    public static String getName(Integer sourceType) {
        for (MethodSourceEnum p : MethodSourceEnum.values()) {
            if (p.getSourceType().equals(sourceType)) {
                return p.name;
            }
        }
        return null;
    }
}
